package org.example.POJO.game;

import org.example.Page.GamePanel;

import java.awt.*;

public class Bing extends Chess {
    public Bing(int camp, Point p) {
        super("Bing", p, camp);
    }
    public Bing(int camp,int px) {
        this(camp, new Point(px, 4));
    }
    public boolean isAbleMove(Point tp, GamePanel gamePanel) {
        if (isLine(tp) < 2 || getStep(tp) > 1) {
            return false;
        }
        if (isPassRiver(this.point)) {
            return !isBack(tp);
        } else {
            return isForward(tp);
        }
    }
}
